package com.leanyuan.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.leanyuan.domain.TParkingspace;
import com.leanyuan.vo.ParkingspaceVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 相亲相爱一家人
 * @since 2021-05-25
 */
@Repository
public interface TParkingspaceMapper_V extends BaseMapper<TParkingspace> {
    IPage<ParkingspaceVo> findByPage(IPage<ParkingspaceVo> page);

    IPage<ParkingspaceVo> findPageByParams(IPage<ParkingspaceVo> page,
                                           @Param("carspaceNum")String carspaceNum,
                                           @Param("carspaceType")String carspaceType,
                                           @Param("parkinglotId")Integer parkinglotId);

    IPage<ParkingspaceVo> findByPage2(IPage<ParkingspaceVo> page);

    IPage<ParkingspaceVo> findParkingspacePageByParam(IPage<ParkingspaceVo> page,
                                          @Param("selCarparkinglot")String selCarparkinglot,
                                          @Param("selParkingSpaceNumber")String selParkingSpaceNumber);

    boolean updateParkingspaceState(@Param("id")Integer id,@Param("state")String state);
}
